package com.zhx.threadcoreknowledge.starttheard;

/**
 * @author ：zhanghaixuan
 * @date ：Created in 2019-09-18 13:17
 * 用途         ： 不能同时执行两次start方法
 */

public class CantStartTwice {

    public static void main(String[] args) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        };
        thread.start();
        thread.start();
    }
}
